import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 获取所有图标组件的映射
export const iconMap = ElementPlusIconsVue

// 获取图标组件
export const getIcon = (iconName: string | undefined) => {
  if (!iconName) return null
  return iconName in ElementPlusIconsVue ? ElementPlusIconsVue[iconName as keyof typeof ElementPlusIconsVue] : null
} 